<?php defined('_JEXEC') or die('Restricted access'); ?>

<script language="javascript" type="text/javascript">
	function submitbutton(pressbutton) {
		var form = document.adminForm;
		if (pressbutton == 'cancel') {
			submitform( pressbutton );
			return;
		}
		// do field validation
		if (form.text.value == "") {
			alert( "<?php echo JText::_( 'Server must have a Name', true ); ?>" );
		} else {
			submitform( pressbutton );
		}
	}
</script>

<form action="index.php" method="post" name="adminForm" id="adminForm">
<div>
	<fieldset class="adminform">
	<legend><?php echo JText::_( 'Details' ); ?></legend>
	<table class="admintable">
		<tr>
			<td width="110" class="key">
				<label for="title">
					<?php echo JText::_( 'Name' ); ?>:
				</label>
			</td>
			<td>
				<input class="inputbox" type="text" name="text" id="text" size="60" value="<?php echo $this->server->text; ?>" />
			</td>
		</tr>
		<tr>
			<td width="110" class="key">
				<label for="alias">
					<?php echo JText::_( 'Manufacturer' ); ?>:
				</label>
			</td>
			<td>
				<input class="inputbox" type="text" name="manufacturer" id="manufacturer" size="60" value="<?php echo $this->server->manufacturer; ?>" />
			</td>
		</tr>
		<tr>
			<td width="110" class="key">
				<label for="alias">
					<?php echo JText::_( 'Chipset' ); ?>:
				</label>
			</td>
			<td>
				<input class="inputbox" type="text" name="chipset" id="chipset" size="60" value="<?php echo $this->server->chipset; ?>" />
			</td>
		</tr>
		<tr>
			<td width="110" class="key">
				<label for="alias">
					<?php echo JText::_( 'RAM' ); ?>:
				</label>
			</td>
			<td>
				<input class="inputbox" type="text" name="ram" id="ram" size="60" value="<?php echo $this->server->ram; ?>" />
			</td>
		</tr>
		<tr>
			<td width="110" class="key">
				<label for="alias">
					<?php echo JText::_( 'HDD' ); ?>:
				</label>
			</td>
			<td>
				<input class="inputbox" type="text" name="hdd" id="hdd" size="60" value="<?php echo $this->server->hdd; ?>" />
			</td>
		</tr>
		<tr>
			<td width="110" class="key">
				<label for="alias">
					<?php echo JText::_( 'Traphic' ); ?>:
				</label>
			</td>
			<td>
				<input class="inputbox" type="text" name="traphic" id="traphic" size="60" value="<?php echo $this->server->traphic; ?>" />
			</td>
		</tr>
		<tr>
			<td width="110" class="key">
				<label for="alias">
					<?php echo JText::_( 'Price traphic' ); ?>:
				</label>
			</td>
			<td>
				<input class="inputbox" type="text" name="pricetr" id="pricetr" size="60" value="<?php echo $this->server->pricetr; ?>" />
			</td>
		</tr>
				<tr>
			<td width="110" class="key">
				<label for="alias">
					<?php echo JText::_( 'Price traphic old' ); ?>:
				</label>
			</td>
			<td>
				<input class="inputbox" type="text" name="pricetrold" id="pricetrold" size="60" value="<?php echo $this->server->pricetrold; ?>" />
			</td>
		</tr>
				<tr>
			<td width="110" class="key">
				<label for="alias">
					<?php echo JText::_( 'Price insrall' ); ?>:
				</label>
			</td>
			<td>
				<input class="inputbox" type="text" name="priceinst" id="priceinst" size="60" value="<?php echo $this->server->priceinst; ?>" />
			</td>
		</tr>
				<tr>
			<td width="110" class="key">
				<label for="alias">
					<?php echo JText::_( 'Ip addr' ); ?>:
				</label>
			</td>
			<td>
				<input class="inputbox" type="text" name="ipaddr" id="ipaddr" size="60" value="<?php echo $this->server->ipaddr; ?>" />
			</td>
		</tr>
		<tr>
			<td width="110" class="key">
				<label for="alias">
					<?php echo JText::_( 'Comment' ); ?>:
				</label>
			</td>
			<td>
				<input class="inputbox" type="text" name="commentt" id="commentt" size="60" value="<?php echo $this->server->commentt; ?>" />
			</td>
		</tr>
		<tr>
			<td width="110" class="key">
				<label for="alias">
					<?php echo JText::_( 'Type server' ); ?>:
				</label>
			</td>
			<td>
				<input class="inputbox" type="text" name="typesrv" id="typesrv" size="60" value="<?php echo $this->server->typesrv; ?>" />
			</td>
		</tr>
		<tr>
			<td width="110" class="key">
				<label for="alias">
					<?php echo JText::_( 'Indextype server' ); ?>:
				</label>
			</td>
			<td>
				<input class="inputbox" type="text" name="indtypesrv" id="indtypesrv" size="60" value="<?php echo $this->server->indtypesrv; ?>" />
			</td>
		</tr>
		<tr>
			<td width="110" class="key">
				<label for="alias">
					<?php echo JText::_( 'Count orders' ); ?>:
				</label>
			</td>
			<td>
				<input class="inputbox" type="text" name="countzakaz" id="countzakaz" size="60" value="<?php echo $this->server->countzakaz; ?>" />
			</td>
		</tr>

		<tr>
			<td class="key">
				<label for="lag">
					<?php echo JText::_( 'Photo small (120px)' ); ?>:
				</label>
			</td>
			<td>
				<input class="inputbox" type="text" name="photo_small" id="photo_small" size="60" value="<?php echo $this->server->photo_small; ?>" />
				<?php echo JText::_( '(please insert a link with http:// to an existing photo)' ); ?>
			</td>
		</tr>
		<tr>
		   <td colspan="2">
		   <?php if ($this->server->photo_small){?>
		      <img src="<?php echo $this->server->photo_small; ?>">
		   <?php } ?>
		   </td>
		</tr>
		<tr>
			<td class="key">
				<label for="lag">
					<?php echo JText::_( 'Photo large (350px)' ); ?>:
				</label>
			</td>
			<td>
				<input class="inputbox" type="text" name="photo_large" id="photo_large" size="60" value="<?php echo $this->server->photo_large; ?>" />
				<?php echo JText::_( '(please insert a link with http:// to an existing photo)' ); ?>
			</td>
		</tr>
		<tr>
		   <td colspan="2">
		   <?php if ($this->server->photo_large){?>
		      <img src="<?php echo $this->server->photo_large; ?>">
		   <?php } ?>
		   </td>
		</tr>

		<tr>
			<td width="120" class="key">
				<?php echo JText::_( 'Published' ); ?>:
			</td>
			<td>
				<?php echo JHTML::_( 'select.booleanlist',  'published', 'class="inputbox"', $this->server->published ); ?>
			</td>
		</tr>
		<tr>
			<td class="key">
				<label for="lag">
					<?php echo JText::_( 'Orders' ); ?>:
				</label>
			</td>
		</tr>

	</table>

	<table class="adminlist">

            <thead>
            <tr>
                <th width="2%">
                    <?php echo JText::_('Nums'); ?>
                </th>
                <th width="20%" align="center">
                    <?php echo JText::_('Name'); ?>
                </th>
                <th width="20%" align="center">
                    <?php echo JText::_('Email'); ?>
                </th>
                <th width="20%" nowrap="Username">
                    <?php echo JText::_('UserName'); ?>
                </th>
                <th width="20%" nowrap="nowrap">
                    <?php echo JText::_('Date'); ?>
                </th>
            </tr>

            </thead>

			<?php $cnt=0; foreach($this->rows as $user) {?>
		    <tr>
				<td width="5">
					<?php $cnt++; echo $cnt ; ?>
				</td>
				<td width="20">
					<?php echo $user->name ; ?>
				 </td>
				 <td width="20">
					<?php echo $user->email ; ?>
				 </td>
				 <td width="20">
					<?php  echo  $user->username; ?>
				</td>
				<td width="20">
					<?php  echo  $user->lastvisitDate . '<br>'; ?>
				</td>
			</tr>
			<?php }?>
	</table>
	</fieldset>
</div>
<div class="clr"></div>
<div class="clr"></div>

<input type="hidden" name="option" value="com_server" />
<input type="hidden" name="id" value="<?php echo $this->server->id; ?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="controller" value="server" />
</form>
